#include <iostream>

using namespace std;

int factorial( int n );

int main() {
    long double foo = 1.0;
    int bar;

    cout << "Please enter the accuracy : ";
    cin >> bar;

    while (bar-- > 0) {
        foo = foo + (1.0/factorial(bar));
    }

    cout << "The e is " << foo;

    return 0;
}

int factorial( int n ) {
    if (n == 0) return 1;
    return n * factorial(n - 1);
}
